package u13.eje7;

import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Main extends JFrame {
	
	private JPanel p;
	
	private void inicializar(){
		setLocation(400, 200);
		setSize(400, 200);
		setTitle("Ejercicio 7");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		//Creacion de panel principal
		this.p=new JPanel();
		this.add(p);
		setVisible(true);
		
		//Creacion de etiqueta
		JLabel l1=new JLabel("Hola Mundo");
		l1.setForeground(Color.WHITE);
		
		p.setBackground(Color.BLUE);
		//p.setLayout(new CardLayout());
		p.add(l1);
		
	}
	
	public Main(){
		inicializar();
	}
	
	public static void main(String[] args) {
		new Main();
	}

}
